package tk.zater.CS;

import java.io.File;
import java.util.Date;

import org.aspectj.weaver.NewConstructorTypeMunger;

import tk.zater.Util.fileinfoutil;

public class EsetVersionConfigeration {
public String domain;
public String updateurl;
public String emulator;
public String contextPath;
public Long updateInterval;
public String versionName;
public int status=-1;
public boolean updatetoHDDirectly=false;
public nowlist nowlist=new nowlist();
public String absolutePath;

public boolean isUpdatetoHDDirectly() {
	return updatetoHDDirectly;
}
public void setUpdatetoHDDirectly(boolean updatetoHDDirectly) {
	this.updatetoHDDirectly = updatetoHDDirectly;
}
public String getAbsolutePath() {
	return absolutePath;
}
public void setAbsolutePath(String absolutePath) {
	this.absolutePath = absolutePath;
}
public nowlist getNowlist() {
	return nowlist;
}
public EsetVersionConfigeration(String contextPath) {
	super();
	this.contextPath = contextPath;
	deal();
}
private String deal() {
	StringBuffer buffer=new  StringBuffer(System.getProperty("web.root"));
	buffer.append(File.separator);
	
	buffer.append(contextPath);
	
	buffer.append(File.separator);
	
	File fw=new File(buffer.toString());
	if(!fw.exists())
	{
		fw.mkdirs();
	}
//	System.out.println(fw.getAbsoluteFile());
	absolutePath=buffer.toString();
	return buffer.toString();
}
public void setNowlist(nowlist nowlist) {
	this.nowlist = nowlist;

	
}
public Date getLastUpdate() {
	return lastUpdate;
}
public void setLastUpdate(Date lastUpdate) {
	this.lastUpdate = lastUpdate;
}
public Date lastUpdate=null;

public String getVersionName() {
	return versionName;
}
public void setVersionName(String versionName) {
	this.versionName = versionName;
}
public String getDomain() {
	return domain;
}
public void setDomain(String domain) {
	this.domain = domain;
}
public String getUpdateurl() {
	return updateurl;
}
public void setUpdateurl(String updateurl) {
	this.updateurl = updateurl;
}
public String getEmulator() {
	return emulator;
}
public void setEmulator(String emulator) {
	this.emulator = emulator;
}
public String getContextPath() {
	return contextPath;
}
public void setContextPath(String contextPath) {
	this.contextPath = contextPath;
}
public Long getUpdateInterval() {
	return updateInterval;
}
public void setUpdateInterval(Long updateInterval) {
	this.updateInterval = updateInterval;
}
public EsetVersionConfigeration(String domain, String updateurl, String emulator, String contextPath,
		Long updateInterval, String versionName) {
	super();
	this.domain = domain;
	this.updateurl = updateurl;
	this.emulator = emulator;
	this.contextPath = contextPath;
	this.updateInterval = updateInterval;
	this.versionName = versionName;
	deal();
}

}
